package cn.sdc.sfw.exception;


public class ReflectException extends SfwRuntimeException {

	public final static int CONSTRUCTOR_NOT_FOUND = 1;
	public final static int CONSTRUCTOR_NOT_FOUND2 = 2;
	public final static int FIELD_NOT_FOUND = 3;
	public final static int METHOD_NOT_FOUND = 4;
	public final static int METHOD_NOT_FOUND2 = 5;
	public final static int METHOD_INVOKE_ERR = 6;
	public final static int CLASS_EXCEPTION = 7;
	public final static int OTHER_ERROR = 9999;
	
	int etype;

	public ReflectException(int exceptionType,Object[] args) {
		super("XXXXXXXX_", args);
	}
	
	public ReflectException(int exceptionType,Object[] args, Throwable cause) {
		super("XXXXXXXX_", args);
	}
	
	public ReflectException(Exception cause, int exceptionType) {
		super("XXXXXXXX", new Object[]{cause}, cause);
	}
    public ReflectException(Class targetClass, Throwable cause, int exceptionType) {
    	super("XXXXXXXX_"+targetClass.getName(), new Object[]{cause}, cause);
    }
	public ReflectException(String targetName, int exceptionType) {
		super("XXXXXXXX_"+targetName, new Object[]{targetName});
	}	
	
	public ReflectException(Exception cause) {
		super("XXXXXXXX", new Object[]{cause}, cause);
	}
    public ReflectException(Class targetClass, Throwable cause) {
    	super("XXXXXXXX_"+targetClass.getName(), new Object[]{cause}, cause);
    }
	public ReflectException(String targetName) {
		super("XXXXXXXX_"+targetName, new Object[]{targetName});
	}
}
